<template>
	<view>
    <view class="grid-title">
      <text>常用工具</text>
    </view>
    <view class="grid-wap u-m-b-10 u-flex u-flex-wrap u-col-center" v-if="list.length">
      <view class="grid-item u-flex-col u-row-center u-col-center" v-for="(menu, index) in list" :key="index" @tap="jump(menu)">
        <image class="tool-img" :src="menu.image" mode="aspectFill"></image>
        <view class="item-title">{{ menu.name }}</view>
      </view>
    </view>
  </view>
</template>

<script>
/**
 * shGrid-宫格列表
 * @property {Array} list  - 宫格列表
 */
export default {
	components: {},
	data() {
		return {
      list : [
        {
          "name": "积分商城",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/integral.png",
          "path": "/pages/app/score/list",
          "path_name": "积分商品",
          "path_type": 1
        },
        {
          "name": "我的地址",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/addr.png",
          "path": "/pages/user/address/list",
          "path_name": "我的地址",
          "path_type": 1
        },
        {
          "name": "浏览足迹",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/views.png",
          "path": "/pages/user/view-log",
          "path_name": "浏览足迹",
          "path_type": 1
        },
        {
          "name": "我的收藏",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/collect.png",
          "path": "/pages/user/favorite",
          "path_name": "我的收藏",
          "path_type": 1
        },
        {
          "name": "常见问题",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/question.png",
          "path": "/pages/public/faq",
          "path_name": "常见问题",
          "path_type": 1
        },
        {
          "name": "问题反馈",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/question.png",
          "path": "/pages/public/feedback",
          "path_name": "问题反馈",
          "path_type": 1
        },
        {
          "name": "我的积分",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/question.png",
          "path": "/pages/user/wallet/score-balance",
          "path_name": "我的积分",
          "path_type": 1
        },
        {
          "name": "系统设置",
          "image": "https://yz-mrzq.oss-cn-shenzhen.aliyuncs.com/imgs/other/user/question.png",
          "path": "/pages/user/set",
          "path_name": "系统设置",
          "path_type": 1
        }
      ]
    };
	},
	computed: {},
	props: {

	},
	created() {},
	methods: {
		jump(data) {
			this.$tools.routerTo(data.path);
		}
	}
};
</script>

<style lang="scss">
.grid-title{
  font-size: 34rpx;
  margin-left: 30rpx;
  color: #fa8a1a;
  display: flex;
  justify-content: space-between;
  margin-bottom: 30rpx;
  .more{
    color: #555;
  }
}
// 宫格
.grid-wap {
	width: 750rpx;
	padding: 30rpx 0 0;
	.grid-item {
		width: 20%;
		margin-bottom: 40rpx;
		.tool-img {
			width: 44rpx;
			height: 44rpx;
		}
		.item-title {
			font-size: 26rpx;
			font-weight: 500;
      color: rgba(250, 138, 26, 0.7);
			line-height: 24rpx;
			padding-top: 20rpx;
		}
	}
}
</style>
